package com.xingda.packing.dmss.events;

import com.alibaba.fastjson.JSONObject;
import com.google.common.eventbus.EventBus;
import com.xingda.packing.dmss.events.dto.EventPLCAlarmSaveDto;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class EventAlarmCreate {

    @Resource
    EventBus eventBus;

    public void save(JSONObject resultJson) {
        EventPLCAlarmSaveDto eventAlarmSaveDto = new EventPLCAlarmSaveDto();
        eventAlarmSaveDto.setResultJson(resultJson);
        eventBus.post(eventAlarmSaveDto);
    }

}
